package fatworm.remote;

import static java.lang.System.*;

import java.rmi.*;
import java.sql.*;
import java.util.*;

public class SimpleDriver extends DriverAdapter
{
    public Connection connect(String url, Properties prop) throws SQLException
    {
        try
        {
            String newurl = url;
            out.println(newurl);
            RemoteDriver rdvr = (RemoteDriver) Naming.lookup(newurl);
            RemoteConnection rconn = rdvr.connect();
            return new SimpleConnection(rconn);
        }
        catch (Exception e)
        {
            throw new SQLException(e);
        }
    }
}
